// Ready function which loads up the DOM
// by calling updateMsg and binds the submit event
// by calling updateMsg and binds the submit event
$(document).ready(function(){
   timestamp = 0;
   // bind function to submit event
   $("form#comment_form").submit(function(){
      $.post("/users/comment", {
         comment: $("#comment").val(),
         comm_id: $("#comm_id").val(),
         user_id: $("#user_id").val()
         }, function(text) {
	$("#user_comments").append(text);
      });
      // prevent the "normal" html submit from firing
      return false;
   });
});
